dash(S8): reception-wire leg 4 -- mn_list_update -> on_mn_list_update (closes the 4-leg wire) - #694
Merged
Merged
Conversation
… CoinStateMaintainer::on_mn_list_update Closes the 4-leg dash reception wire. Legs 1-3 wired the mempool-relay (new_tx), tip-advance (new_tip) and block-connect (block_connected) events into CoinStateMaintainer; this adds the mnlistdiff RESYNC leg. Every full masternode-set snapshot dashd delivers routes to on_mn_list_update(), which REPLACES the DMN set the embedded coinbase pays wholesale (authoritative bulk feed) -- distinct from leg 3 folding per-block deltas incrementally between snapshots. An empty snapshot is a set-gap: it demotes the node-held bundle to the retained dashd getblocktemplate fallback rather than backing a template with a phantom payee. Interface-shape addition (purely additive, dash interface only, single-coin): dash::interfaces::Node gains Event<MnListUpdate> mn_list_update, where MnListUpdate carries the projected set as vector<pair<uint256, coin::MNState>> -- exactly on_mn_list_update()s signature. node_interface.hpp now pulls mn_state_machine.hpp (dash-coin scoped, no cross-coin reach) for MNState, matching the codec weight it already takes from block.hpp/transaction.hpp. src/impl/dash/coin/mn_list_ingest.hpp: wire_mn_list_ingest() subscribes on_mn_list_update to the event; teardown via the returned EventDisposable, same lifetime contract as the other three legs. KAT: test_dash_node_reception_wire gains 3 cases proving the leg end-to-end off the real Event (no direct poke) -- a snapshot seeds the DMN set and arms the embedded bundle with a tip present; an empty snapshot demotes to dashd; dispose stops ingest. Suite 11/11 green. Dashd RPC fallback retained.
frstrtr
changed the base branch from
dash/s8-reception-wire-block-connect-leg
to
master
July 13, 2026 19:39
frstrtr
added a commit
that referenced
this pull request
Jul 13, 2026
…work() template source + assemble_work_job_targets() The embedded get_work chain was fully wired but had NO production consumer: NodeCoinState::select_work() (embedded template when the 4-leg reception wire (#693/#694) has populated the node bundle, else the retained dashd getblocktemplate fallback) and assemble_work_job_targets() (per-miner job-target arithmetic) each existed and were unit-tested, but nothing fused them into a single miner-facing entry. Only the test suites ever called select_work(). Add dash::stratum::get_work() (src/impl/dash/stratum/get_work.hpp): the first non-test caller of the embedded arm. It sources the base block template off the node-held NodeCoinState -- NO direct dashd poll on the hot path when the bundle is populated -- and assembles the job targets over whichever template arm ran. dashd_fallback stays REQUIRED and is invoked ONLY on a set-gap (unpopulated / invalidated bundle): the always-reachable safety + [GBT-XCHECK] cross-check arm, never removed. test_dash_get_work (4/4) pins the fused contract, seeding mirrored exactly from test_dash_node_embedded_wire (no fabricated oracle values): * set-gap routes DashdFallback (invoked once) and still assembles targets; * populated routes Embedded WITHOUT invoking the fallback, byte-equal to a direct build_embedded_workdata() over the node's own held state; * job targets are identical across both template sources; * on_invalidate (reorg) demotes back to the fallback. Registered in both build.yml --target allowlists. STRICTLY single-coin (src/impl/dash/ + test only), SAFE-ADDITIVE.
frstrtr
added a commit
that referenced
this pull request
Jul 14, 2026
…work() template source + assemble_work_job_targets() The embedded get_work chain was fully wired but had NO production consumer: NodeCoinState::select_work() (embedded template when the 4-leg reception wire (#693/#694) has populated the node bundle, else the retained dashd getblocktemplate fallback) and assemble_work_job_targets() (per-miner job-target arithmetic) each existed and were unit-tested, but nothing fused them into a single miner-facing entry. Only the test suites ever called select_work(). Add dash::stratum::get_work() (src/impl/dash/stratum/get_work.hpp): the first non-test caller of the embedded arm. It sources the base block template off the node-held NodeCoinState -- NO direct dashd poll on the hot path when the bundle is populated -- and assembles the job targets over whichever template arm ran. dashd_fallback stays REQUIRED and is invoked ONLY on a set-gap (unpopulated / invalidated bundle): the always-reachable safety + [GBT-XCHECK] cross-check arm, never removed. test_dash_get_work (4/4) pins the fused contract, seeding mirrored exactly from test_dash_node_embedded_wire (no fabricated oracle values): * set-gap routes DashdFallback (invoked once) and still assembles targets; * populated routes Embedded WITHOUT invoking the fallback, byte-equal to a direct build_embedded_workdata() over the node's own held state; * job targets are identical across both template sources; * on_invalidate (reorg) demotes back to the fallback. Registered in both build.yml --target allowlists. STRICTLY single-coin (src/impl/dash/ + test only), SAFE-ADDITIVE.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacks on #693 (legs 1+3). Closes the dash reception wire: adds the mnlistdiff RESYNC leg.
What
node_interface.hpp: +Event<MnListUpdate> mn_list_updateondash::interfaces::Node;MnListUpdatecarries the projected DMN set asvector<pair<uint256, coin::MNState>>(exactlyon_mn_list_update()s signature). Pullsmn_state_machine.hppfor MNState (dash-coin scoped, no cross-coin reach).mn_list_ingest.hpp(new):wire_mn_list_ingest()subscribesCoinStateMaintainer::on_mn_list_updateto the event; teardown via returned EventDisposable, same lifetime contract as legs 1-3.test_dash_node_reception_wire.cpp: +3 KAT.Why
Legs 1-3 wired new_tx / new_tip / block_connected.
on_mn_list_updatehad no source event on the interface at all (called out in leg 1s scope note). This is the authoritative bulk masternode-set resync -- distinct from leg 3 folding per-block deltas incrementally between snapshots. An empty snapshot is a set-gap -> demote to the retained dashd getblocktemplate fallback.Scope / safety
src/impl/dash/coin/+test/only. No bitcoin_family / src/core / other-coin trees. Per-coin isolation intact.test_dash_node_reception_wireexe (already allowlisted) picks up the header + cases.Verification (Linux x86_64, from build/)
ctest -R ^DashReceptionWire-> 11/11 passed (8 prior legs + 3 leg-4).--target dash,test_dash_node_interface,c2pool-dashall build clean (interface change compiles at every node_interface.hpp consumer).